<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>
<h2 class="contentTitle">添加字段</h2>
<form method="post" action="${ctx}/sqlcolumn/create" class="required-validate pageForm" onsubmit="return validateCallback(this, dialogAjaxDone);">
	<div class="pageFormContent" layoutH="97">
			<input type="hidden" name="sqlTable.id" size="36" value="${tabid}" class="required" maxlength="8"/>
		<p>
			<label>字段名称:</label>
			<!-- 限制字母 数字 下划线 且必填 class="required alphanumeric" -->
			<input type="text" name="colName" class="required alphanumeric" size="36" maxlength="100"/>
		</p>
		<p>
			<label>字段类型:</label>
			<select class="combox" name="colType" >
			    <option value="VARCHAR:java.lang.String">选择相应字段类型</option>
				<option value="TINYINT:java.lang.Byte">TINYINT(java.lang.Byte)</option>
				<option value="SMALLINT:java.lang.Short">SMALLINT(java.lang.Short)</option>
				<option value="INTEGER:java.lang.Integer">INT(java.lang.Integer)</option>
				<option value="INTEGER:java.lang.Integer">INTEGER(java.lang.Integer)</option>
				<option value="BIGINT:java.lang.Long">BIGINT(java.lang.Long)</option>
				<option value="FLOAT:java.lang.Float">FLOAT(java.lang.Float)</option>
				<option value="DOUBLE:java.lang.Double">DOUBLE(java.lang.Double)</option>
				<option value="NUMERIC:java.math.BigDecimal">NUMERIC(java.math.BigDecimal)</option>
				<option value="CHAR(1):java.lang.Character">CHAR(1)(java.lang.Character)</option>
				<option value="('Y'或'N'):java.lang.Boolean">CHAR(1)(java.lang.Boolean)</option>
				<option value="BIT:java.lang.Boolean">BIT(java.lang.Boolean)</option>
				<option value="VARCHAR:java.lang.String">VARCHAR(java.lang.String)</option>
				<option value="DATE:java.util.Date">DATE(java.util.Date)</option>
				<option value="DATE:java.sql.Date">DATE(java.sql.Date)</option>
				<option value="TIME:java.util.Date">TIME(java.util.Date)</option>
				<option value="TIME:java.sql.Time">TIME(java.sql.Time)</option>
				<option value="TIMESTAMP:java.util.Date">TIMESTAMP(java.util.Date)</option>
				<option value="TIMESTAMP:java.sql.Timestamp">TIMESTAMP(java.sql.Timestamp)</option>
				<option value="VARBINARY:byte[]">VARBINARY(byte[])</option>
				<option value="VARBINARY:java.io.Serializable">VARBINARY(Serializable)</option>
				<option value="CLOB:java.sql.Clob">CLOB(java.sql.Clob)</option>
				<option value="CLOB:java.lang.String">CLOB(java.lang.String)</option>
				<option value="BLOB:java.sql.Blob">BLOB(java.sql.Blob)</option>
				<option value="BLOB:byte[]">BLOB(byte[])</option>
				<option value="VARCHAR:java.lang.Class">VARCHAR(java.lang.Class)</option>
				<option value="VARCHAR:java.util.Locale">VARCHAR(java.util.Locale)</option>
				<option value="VARCHAR:java.util.TimeZone">VARCHAR(java.util.TimeZone)</option>
				<option value="VARCHAR:java.util.Currency">VARCHAR(java.util.Currency)</option>
			</select>
		</p>		
		<p>
			<label>字段长度:</label>
			<input type="text" name="colSize" size="36" class="required" maxlength="8"/>
		</p>
		<p>
			<label>是否主键:</label>
			<select class="combox" name="colPrikey" style="width: 230px">
			    <option value="N">选择是否为主键</option>
			    <option value="Y">是</option>
			    <option value="N">否</option>
			</select>
		</p>
		<p>
			<label>字段描述:</label>
			<input type="text" name="colDes" size="36" maxlength="200" class="required"/>
		</p>
		<p>
			<label>是否为空:</label>
			<select class="combox" name="colNull" style="width: 230px">
			    <option value="Y">选择是否可为空</option>
			    <option value="Y">是</option>
			    <option value="N">否</option>
			</select>
		</p>
		<p>
			<label>备注:</label>
			<textarea rows="3" cols="25" name="memo"  maxlength="200" ></textarea>
		</p>
		
	</div>
			
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent"><button type="submit">确定</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
		</ul>
	</div>
</form>